<div th:fragment="details">

    <div class="modal fade" id="myModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">系统反馈详情</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label  class="control-label">标题:</label>
                        <input type="text" autocomplete="off"  class="form-control" placeholder="请输入标题"  id="title"  name="title">
                    </div>
                    <div class="form-group">
                        <label  class="control-label">需求描述:</label>
                        <input type="text" class="form-control" autocomplete="off" placeholder="请输入需求描述" id="demandDescribe" value=""  name="demandDescribe">
                    </div>

                    <div class="form-group">
                        <label  class="control-label">技术要求:</label>
                        <input type="text" class="form-control" autocomplete="off" placeholder="请输入技术要求" id="technology"  value=""  name="technology">
                    </div>
                    <div class="form-group">
                        <label  class="control-label">预计时长:</label>
                        <input type="number" class="form-control" autocomplete="off" placeholder="请输入预计时长"   id="estimatedDuration" value=""  name="estimatedDuration">
                    </div>
                    <div class="form-group">
                        <label  class="control-label">赏金:</label>
                        <input type="number" class="form-control" autocomplete="off" placeholder="请输入赏金" id="moneyReward"  value=""  name="moneyReward">
                    </div>
                    <div class="form-group">
                        <label  class="control-label">联系人:</label>
                        <input type="text" class="form-control"  autocomplete="off" placeholder="请输入联系人" id="contactName"   name="contactName">
                    </div>
                    <div class="form-group">
                        <label  class="control-label">联系人手机号:</label>
                        <input type="number" class="form-control"  autocomplete="off" placeholder="请输入联系人手机号"  id="contactNumber"    name="contactNumber">
                    </div>
                    <div class="form-group">
                        <label  class="control-label">发布时间:</label>
                        <input type="text" class="form-control"  autocomplete="off" placeholder="请输入联系人手机号"  id="publisherTime"    name="publisherTime">
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>

            </div>
        </div>
    </div>

    <script>
        //加載用戶編輯彈框
        function EditViewById(id){
            $('#myModal').modal();
            const data = {
                id: id
            };
            myrequest("/admin/demand/details",data,'GET',function(data){
                $("#title").val(data.data.title);
                $("#demandDescribe").val(data.data.demandDescribe);
                const status = data.data.status;
                if (status === 1) {
                    $("#status").val('未解决');
                } else if (status === 2) {
                    $("#status").val('已解决');
                }
                $("#contactName").val(data.data.contactName);
                $("#contactNumber").val(data.data.contactNumber);
                $("#technology").val(data.data.technology);
                $("#estimatedDuration").val(data.data.estimatedDuration);
                $("#moneyReward").val(data.data.moneyReward);
                $("#publisherTime").val(data.data.publisherTime);
            }, function(data){
                toastr.error(data.msg);
            })
        }

    </script>

</div>